#导包
from rest_framework import serializers

# 导入需要序列化的表
from myapp.models import *


# 建立序列化类


# 用户表序列化
class UserSer(serializers.ModelSerializer):

    class Meta:
        model = User
        fields = "__all__"




# 轮播图序列化
class CarouselSer(serializers.ModelSerializer):

    class Meta:
        model = Carousel
        fields = "__all__"


# 商品表序列化
class GoodsSer(serializers.ModelSerializer):

    class Meta:
        model = Goods
        fields = "__all__"

# 商品类别表序列化
class CategorySer(serializers.ModelSerializer):

    class Meta:
        model = Category
        fields = "__all__"

# 商品评论序列化
class CommentSer(serializers.ModelSerializer):

    class Meta:
        model = Comment
        fields = "__all__"
